﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using TestMySqlConnetPoll;
using System.Threading;

namespace View.Setting.TCRepair
{
    public partial class TCRepairNewForm : DevExpress.XtraEditors.XtraForm
    {
        //天窗操作对象
        private TianChuangXiuTable tianchuang = new TianChuangXiuTable();
        public objTianChuang tianchuangObj = new objTianChuang();

        public TCRepairNewForm()
        {
            InitializeComponent();
        }

        //private void LoadTianContext()
        //{
        //    objDate start = new objDate();
        //    tianchuang.ReadValueList(start, start);

        //    while (!tianchuang.ReadyValueList)
        //    {
        //        if (tianchuang.ErrorFlag != 0)
        //            return;

        //        Thread.Sleep(20);
        //    }

        //    tianchuang.ValueList
        //}

        private void LoadTianChuangArea()
        {
        }

        private void groupBox1_Paint(object sender, PaintEventArgs e)
        {
            GroupBox gb = sender as GroupBox;
            e.Graphics.Clear(gb.BackColor);
            e.Graphics.DrawString(gb.Text, gb.Font, Brushes.DarkBlue, 10, 1);
            e.Graphics.DrawLine(Pens.Snow, 1, 7, 8, 7);
            e.Graphics.DrawLine(Pens.Snow, e.Graphics.MeasureString(gb.Text, gb.Font).Width + 8, 7, gb.Width - 2, 7);
            e.Graphics.DrawLine(Pens.Snow, 1, 7, 1, gb.Height - 2);
            e.Graphics.DrawLine(Pens.Snow, 1, gb.Height - 2, gb.Width - 2, gb.Height - 2);
            e.Graphics.DrawLine(Pens.Snow, gb.Width - 2, 7, gb.Width - 2, gb.Height - 2);
        }


        private void groupBox3_Paint(object sender, PaintEventArgs e)
        {
            GroupBox gb = sender as GroupBox;
            e.Graphics.Clear(gb.BackColor);
            e.Graphics.DrawString(gb.Text, gb.Font, Brushes.DarkBlue, 10, 1);
            e.Graphics.DrawLine(Pens.Snow, 1, 7, 8, 7);
            e.Graphics.DrawLine(Pens.Snow, e.Graphics.MeasureString(gb.Text, gb.Font).Width + 8, 7, gb.Width - 2, 7);
            e.Graphics.DrawLine(Pens.Snow, 1, 7, 1, gb.Height - 2);
            e.Graphics.DrawLine(Pens.Snow, 1, gb.Height - 2, gb.Width - 2, gb.Height - 2);
            e.Graphics.DrawLine(Pens.Snow, gb.Width - 2, 7, gb.Width - 2, gb.Height - 2);
        }

        private void groupBox4_Paint(object sender, PaintEventArgs e)
        {
            GroupBox gb = sender as GroupBox;
            e.Graphics.Clear(gb.BackColor);
            e.Graphics.DrawString(gb.Text, gb.Font, Brushes.DarkBlue, 10, 1);
            e.Graphics.DrawLine(Pens.Snow, 1, 7, 8, 7);
            e.Graphics.DrawLine(Pens.Snow, e.Graphics.MeasureString(gb.Text, gb.Font).Width + 8, 7, gb.Width - 2, 7);
            e.Graphics.DrawLine(Pens.Snow, 1, 7, 1, gb.Height - 2);
            e.Graphics.DrawLine(Pens.Snow, 1, gb.Height - 2, gb.Width - 2, gb.Height - 2);
            e.Graphics.DrawLine(Pens.Snow, gb.Width - 2, 7, gb.Width - 2, gb.Height - 2);
        }

        /// <summary>
        /// 天窗区域编辑
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LinkLblArea_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {

        }



 
    }
}